/*
 * (c) 2021 <tanghaifeng-gz@loongson.cn> <pengren.mcu@qq.com>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 *
 */

#ifndef __LS2K_ART_PAD_CONFIG_H
#define __LS2K_ART_PAD_CONFIG_H

#define CONFIG_RECOVER

#include "ls2k_mxm_core.h"
#include "loongson_bootmenu.h"

/* Loongson bootelf bootparam smbios */
#define CONFIG_LOONGSON_BOARD_NAME "LS2K1000-Art-Pad"

/* Framebuffer and LCD */
#if defined(CONFIG_VIDEO_LS1X)
#define LS1X_DC0
//#define LS1X_DC0_USE_DEMODE
//#define LS1X_DC1
//#define LS1X_DC1_USE_DEMODE
#define LS1X_DC_MAX 1
#endif

#define	CONFIG_EXTRA_ENV_SETTINGS					\
	CONSOLE_STDOUT_SETTINGS \
	LOONGSON_BOOTMENU \
	"loadaddr=" __stringify(CONFIG_SYS_LOAD_ADDR) "\0" \
	"fdt_addr=" __stringify(FDT_LOAD_ADDR) "\0" \
	"rd_start=" __stringify(RAMDISK_START) "\0" \
	"rd_size=" __stringify(RAMDISK_SIZE) "\0" \
	"mtdids=" CONFIG_MTDIDS_DEFAULT "\0"					\
	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0"				\
	"splashpos=m,m\0" \
	"video=" "VGA-1:1280x800-32@60 video=VGA-2:1280x800-32@60" "\0" \
	"panel0=" "hz101wx" "\0" \
	"root_dev=sda\0" \
	"syspart=1\0" \
	"update=1\0" \

#define CONFIG_BOOTCOMMAND	"setenv bootargs ${bootargs} root=/dev/${root_dev}${syspart} mtdparts=${mtdparts} video=${video}\; \
scsi scan\;ext4load scsi 0:${syspart} ${loadaddr} /boot/uImage\;bootm ${loadaddr}"
/*#define CONFIG_BOOTCOMMAND	"setenv bootargs ${bootargs} mtdparts=${mtdparts} video=${video}\; \
sf probe\;nboot kernel\;bootm ${loadaddr}"*/

/* Boot beep */
#define BEEP_GPIO 71 //tca6424 i2c扩展gpio的P7脚

#endif	/* __LS2K_ART_PAD_CONFIG_H */
